import { resultSuccess } from "mock/_util";
import { MockMethod } from "vite-plugin-mock";
import { IntershipTypeEnum } from "/@/enums/typeEnum";
import { getReport, getScore } from "./data";

function getIntershipInfo() {
  return {
    grade: "高一",
    schoolName: "静海一中",
    startDate: "2022-01-01",
    subject: "化学",
    teacherName: "张三",
    type: IntershipTypeEnum.Individual,
  };
}

function getRemark() {
  return {
    personalSummary: "个人总结111",
    groupEvaluation: "小组评价1111",
    schRemark: "中学教师评语abababa",
    univRemark: "高校教师评语abababa",
  };
}

export default [
  {
    url: "/dev-api/internInfo/setSummary",
    method: "put",
    response: () => {
      return resultSuccess({});
    },
  },
  {
    url: "/dev-api/internInfo/getInfo",
    timeout: 100,
    method: "get",
    response: () => {
      return resultSuccess(getIntershipInfo());
    },
  },
  {
    url: "/dev-api/internInfo/getInfo/:id",
    timeout: 100,
    method: "get",
    response: () => {
      return resultSuccess(getIntershipInfo());
    },
  },
  {
    url: "/dev-api/internInfo/getRemark",
    timeout: 100,
    method: "get",
    response: () => {
      return resultSuccess(getRemark());
    },
  },
  {
    url: "/dev-api/internInfo/getRemark/:id",
    timeout: 100,
    method: "get",
    response: () => {
      return resultSuccess(getRemark());
    },
  },
  {
    url: "/dev-api/internInfo/getReport/:id",
    timeout: 100,
    method: "get",
    response: () => {
      return resultSuccess(getReport());
    },
  },
  {
    url: "/dev-api/internInfo/remark/univ/:id",
    timeout: 100,
    method: "put",
    response: () => {
      return resultSuccess({});
    },
  },
  {
    url: "/dev-api/internInfo/remark/sch/:id",
    timeout: 100,
    method: "put",
    response: () => {
      return resultSuccess({});
    },
  },
  {
    url: "/dev-api/internInfo/setScore/group/:id",
    method: "put",
    response: () => {
      return resultSuccess({});
    },
  },
  {
    url: "/dev-api/internInfo/setScore/lectureNote/:id",
    timeout: 100,
    method: "put",
    response: () => {
      return resultSuccess({});
    },
  },
  {
    url: "/dev-api/internInfo/setScore/lessonPlan/:id",
    timeout: 100,
    method: "put",
    response: () => {
      return resultSuccess({});
    },
  },
  {
    url: "/dev-api/internInfo/setScore/teacherMoral/:id",
    timeout: 100,
    method: "put",
    response: () => {
      return resultSuccess({});
    },
  },
  {
    url: "/dev-api/internInfo/setScore/teachingStudy/:id",
    timeout: 100,
    method: "put",
    response: () => {
      return resultSuccess({});
    },
  },
  {
    url: "/dev-api/internInfo/getScore/group/:id",
    method: "get",
    response: () => {
      return resultSuccess(getScore());
    },
  },
  {
    url: "/dev-api/internInfo/getScore/lectureNote/:id",
    timeout: 100,
    method: "get",
    response: () => {
      return resultSuccess(getScore());
    },
  },
  {
    url: "/dev-api/internInfo/getScore/lessonPlan/:id",
    timeout: 100,
    method: "get",
    response: () => {
      return resultSuccess(getScore());
    },
  },
  {
    url: "/dev-api/internInfo/getScore/teacherMoral/:id",
    timeout: 100,
    method: "get",
    response: () => {
      return resultSuccess(getScore());
    },
  },
  {
    url: "/dev-api/internInfo/getScore/teachingStudy/:id",
    timeout: 100,
    method: "get",
    response: () => {
      return resultSuccess(getScore());
    },
  },
] as MockMethod[];
